﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="ci-documents-download.aspx.cs" Inherits="car_ci_documents_download" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=40);
            opacity: 0.5;
        }
        .ModalWindow
        {
            border: solid1px#c0c0c0;
            background: #f0f0f0;
            padding: 0px10px10px10px;
            position: absolute;
            top: -1000px;
        }
    </style>
    <div class="contents">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td>
                    <table cellpadding="1" cellspacing="1" border="0">
                        <div style="display: none;">
                            <asp:TextBox ID="txtCarId" runat="server"></asp:TextBox>
                            <asp:TextBox ID="txtProviderId" runat="server"></asp:TextBox>
                            <asp:TextBox ID="txtUserId" runat="server"></asp:TextBox>
                        </div>
                        <tr>
                            <td colspan="2">
                                <h1>
                                    Car - Documents Details</h1>
                            </td>
                        </tr>
                        <asp:Panel ID="pnlCarDetails" runat="server">
                            <tr>
                                <td style="width: 200;">
                                    Reference No.
                                </td>
                                <td align="left">
                                    :&nbsp;<asp:Label ID="lblUpRefNo" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 200;">
                                    Applicant's Name
                                </td>
                                <td align="left">
                                    :&nbsp;<asp:Label ID="lblUpApplicantName" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 200;">
                                    Insurance Company
                                </td>
                                <td align="left">
                                    :&nbsp;<asp:Label ID="lblUpInsurer" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 200;">
                                    Plan Name
                                </td>
                                <td align="left">
                                    :&nbsp;<asp:Label ID="lblUpPlanName" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 200;">
                                    Excel DownLoad
                                </td>
                                <td align="left">
                                    :&nbsp;
                                    <asp:HyperLink ID="hplExcelDownLoad" Visible="false" runat="server" Target="_blank"
                                        Text="DownlaodExcel"></asp:HyperLink>
                                    <asp:Button ID="btnExcelDownload" CausesValidation="false" runat="server" Visible="false"
                                        Text="DownlaodExcel>" OnClick="btnExcelDownload_Click" />
                                    <br />
                                    <br />
                                </td>
                            </tr>
                        </asp:Panel>
                        <asp:Panel ID="pnlDocuments" runat="server">
                            <tr>
                                <td colspan="2">
                                    <b>Document Downloads</b>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:GridView ID="grvFileUpload" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                        CellSpacing="3" CellPadding="3" Width="100%" CssClass="admin_gridstyle" PagerStyle-CssClass="pgr"
                                        EmptyDataText="There are no data records to display." GridLines="None" DataKeyNames="FileId,FilePath"
                                        OnRowDataBound="grvFileUpload_RowDataBound">
                                        <Columns>
                                            <asp:BoundField DataField="FileType" HeaderText="FileUploadType" SortExpression="FileType"
                                                ItemStyle-Width="150px" />
                                            <asp:BoundField DataField="FileName" HeaderText="FileName" SortExpression="FileName"
                                                ItemStyle-Width="250px" />
                                            <asp:TemplateField HeaderText="Downlaod">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="hplDownLoad" runat="server" Text="Downlaod" Target="_blank"></asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Downlaod" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblPath" runat="server" Text='<%# Eval("FilePath").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle />
                                        <PagerStyle />
                                        <SelectedRowStyle />
                                        <HeaderStyle CssClass="admin_gridheader" />
                                        <EditRowStyle />
                                        <AlternatingRowStyle CssClass="admin_gridodd" />
                                        <RowStyle CssClass="admin_grideven" />
                                    </asp:GridView>
                                    <br /><br />
                                </td>
                            </tr>
                            <tr>
                                <td align="left" colspan="2">
                                    <asp:DropDownList ID="ddlExcelLanguage" runat="server">
                                        <asp:ListItem Text="English" Value="EN"></asp:ListItem>
                                        <asp:ListItem Text="Thai" Value="TH"></asp:ListItem>
                                    </asp:DropDownList>
                                    &nbsp;&nbsp;
                                    <asp:Button ID="btnInternal" runat="server" Text="Downlaod Excel for Internal Use"
                                        OnClick="btnInternal_Click" />
                                    <div style="display: none;">
                                        <asp:Label ID="lblInternalExcel" runat="server"></asp:Label>
                                    </div>
                                </td>
                            </tr>
                        </asp:Panel>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
